package com.bupt.cad;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Value;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.LongStream;

public class Test {

    public static void main(String[] args) {
        List<Map<String,Object>> list = new ArrayList<>();
//        Class<List<Map<String,Object>>> type = (Class<List<Map<String, Object>>>) list.getClass();
        Map<String,Object> data = new HashMap<>();
        Map<String,Object> data1 = new HashMap<>();
        data.put("hello",1234);
        data1.put("hello",1234);
        list.add(data);
        list.add(data1);
        System.out.println(data.getClass());
        String s = JSON.toJSONString(list);
        List list1 = JSON.parseObject(s, list.getClass());
        System.out.println(s);
        System.out.println(list1);

//        return LongStream.rangeClosed(1, count)
//                .boxed()
//                .collect(Collectors.toConcurrentMap(i -> UUID.randomUUID().toString(), Function.identity(), (o1, o2) -> o1, ConcurrentHashMap::new));
    }
}
